<template>
  <div id="app">
    <!-- <h1>{{ num }}</h1>
    <button @click="addNum">点击++</button> -->
    <router-view />
    <!-- {{ abc }}
    <button @click="btnClick">点击++</button> -->
  </div>
</template>

<script>
export default {
  name: 'App',
  data() {
    return {
      abc: 1
    }
  },
  watch: {
    $route: {
      handler() {
        console.log('watch')
      }
      // immediate: true
    }
  },
  created() {},
  beforeUpdate() {
    // console.log('app beforeUpdate')
  },
  methods: {
    btnClick() {
      this.abc++
    }
  }
}
</script>
